package com.qianfeng.dao;

import com.qianfeng.domin.Upload;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface UploadDao {

    Upload queryById(int id);

    int addUploadRecord(Upload upload);

    Upload queryByBookId(long uploadedBook);

    Date getMaxUploadDate();

    List<Upload> queryByUploadedDate();

    List<Upload> queryByUserId(long userId);

    int deleteUploadRow(long uploadedBook);

    int deleteUploadRowByUser(long uploader);

    List<Upload> searchByToday();

    List<Upload> searchBySevenDays();

    List<Upload> searchByThirtyDays();

}
